﻿<Window x:Class="WpfHardCodedStringsFinder.SelectProjectWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Select solution"
        Width="670"
        Height="350"
        FocusManager.FocusedElement="{Binding ElementName=treePro}"
        Loaded="Window_Loaded">
	<Window.Resources>
		<DataTemplate x:Key="ProjectItemStyle">
			<StackPanel Orientation="Horizontal">
				<Image Source="pack:////application:,,/Images/project.icon" />
				<TextBlock Text="{Binding Header}" />
			</StackPanel>
		</DataTemplate>
	</Window.Resources>
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
		<TreeView x:Name="treeProj"
		          ItemTemplate="{DynamicResource ProjectItemStyle}"
		          SelectedItemChanged="treeProj_SelectedItemChanged">
			<TreeView.ContextMenu>
				<ContextMenu x:Name="treeContextMenu">
					<MenuItem x:Name="miGetDuplStr"
							  Click="miGetDuplStr_Click"
					          Header="GetDuplicate strings" />
					<Separator />
					<MenuItem x:Name="miReloadData"
					          Click="miReloadData_Click"
					          Header="Reload solution" />
				</ContextMenu>
			</TreeView.ContextMenu>
		</TreeView>
		<ListView x:Name="lstCompFilesView"
		          Grid.Column="1"
		          ItemsSource="{Binding}">
			<ListView.View>
				<GridView>
					<GridView.Columns>
						<GridViewColumn Width="60" Header="Process">
							<GridViewColumn.CellTemplate>
								<DataTemplate>
									<CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay}" />
								</DataTemplate>
							</GridViewColumn.CellTemplate>
						</GridViewColumn>
						<GridViewColumn Width="260"
						                DisplayMemberBinding="{Binding File}"
						                Header="File" />
					</GridView.Columns>
				</GridView>
			</ListView.View>
			<ListView.ContextMenu>
				<ContextMenu x:Name="listCM">
					<Separator />
					<MenuItem x:Name="miDeselectAll"
					          Click="miDeselectAll_Click"
					          Header="Clear selection" />
					<MenuItem x:Name="miProcessFiles"
					          Click="miProcessFiles_Click"
					          Header="Find strings" />
				</ContextMenu>
			</ListView.ContextMenu>
		</ListView>
	</Grid>
</Window>
